# Triton server
CUDA_VISIBLE_DEVICES=0 nohup /opt/tritonserver/bin/tritonserver --model-store=/model_repos/QAEnsemble_embed_rerank --http-port=9000 --grpc-port=9001 --metrics-port=9002 --log-verbose=1 > /workspace/qanything_local/logs/debug_logs/embed_rerank_tritonserver.log 2>&1 &

CUDA_VISIBLE_DEVICES=1 nohup /opt/tritonserver/bin/tritonserver --model-store=/model_repos/QAEnsemble_base --http-port=10000 --grpc-port=10001 --metrics-port=10002 --log-verbose=1 > /workspace/qanything_local/logs/debug_logs/llm_tritonserver.log 2>&1 &

# Rerank server
cd /workspace/qanything_local
nohup python3 -u qanything_kernel/dependent_server/rerank_for_local_serve/rerank_server.py > /workspace/qanything_local/logs/debug_logs/rerank_server.log 2>&1 &

# llm server
nohup python3 -u qanything_kernel/dependent_server/llm_for_local_serve/llm_server_entrypoint.py > /workspace/qanything_local/logs/debug_logs/llm_server_entrypoint.log 2>&1 &

# sanic_api server
nohup python3 -u qanything_kernel/qanything_server/sanic_api.py > /workspace/qanything_local/logs/debug_logs/sanic_api.log 2>&1 &

# 前端服务
cd /workspace/qanything_local/front_end
nohup npm run serve > /workspace/qanything_local/logs/debug_logs/npm_server.log 2>&1 &


# nohup python3 -u process_data.py > /workspace/qanything_local/logs/debug_logs/test_zhengwu_data.log 2>&1 &

# CUDA_VISIBLE_DEVICES=1 nohup python3 -u qanything_kernel/dependent_server/ocr_serve/ocr_server.py > /workspace/qanything_local/logs/debug_logs/ocr_server.log 2>&1 &

# nohup python3 -u answer_gen.py > /workspace/qanything_local/logs/debug_logs/answer_gen.log 2>&1 &


# docker run -d \
# --restart=always \
# --name qany_es \
# -p 9200:9200 \
# -p 9300:9300 \
# --privileged \
# -e "discovery.type=single-node" \
# -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
# registry.cn-beijing.aliyuncs.com/idealnj/elasticsearch:8.7.1  


 nohup python3 -u qa_generate.py > /workspace/qanything_local/logs/debug_logs/qa_generate.log 2>&1 &